<?php
/**
 * Created by PhpStorm.
 * User: z
 * Date: 14-9-15
 * Time: 下午10:01
 */
class Controller_Toerp extends Controller
{
    /**
     * 从老erp获取数据到进销存系统
     */
    public function action_tonewerppayways()
    {
        $old_data = Payway::get_payway_erp();
        Payway::insert_payway_newerp_bat($old_data);
    }

    /**
     * 同步数据到进销存系统
     */
    public function action_tonewerpbankinfos()
    {
        $old = Supplierbank::get_bankinfos_from_erp();
        Supplierbank::insert_bankinfos_newerp_bat($old);
    }

    public function action_updatebankinfos()
    {
        $old = Supplierbank::get_bankinfos_from_erp();
        Supplierbank::update_bankinfos_newerp_bat($old);
    }
}